package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbVirusDeviceMapper;
import com.ruoyi.system.domain.TbVirusDevice;
import com.ruoyi.system.service.ITbVirusDeviceService;

/**
 * 防病毒安装总数表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-17
 */
@Service
public class TbVirusDeviceServiceImpl implements ITbVirusDeviceService 
{
    @Autowired
    private TbVirusDeviceMapper tbVirusDeviceMapper;

    /**
     * 查询防病毒安装总数表
     * 
     * @param deviceId 防病毒安装总数表主键
     * @return 防病毒安装总数表
     */
    @Override
    public TbVirusDevice selectTbVirusDeviceByDeviceId(Integer deviceId)
    {
        return tbVirusDeviceMapper.selectTbVirusDeviceByDeviceId(deviceId);
    }

    /**
     * 查询防病毒安装总数表列表
     * 
     * @param tbVirusDevice 防病毒安装总数表
     * @return 防病毒安装总数表
     */
    @Override
    public List<TbVirusDevice> selectTbVirusDeviceList(TbVirusDevice tbVirusDevice)
    {
        return tbVirusDeviceMapper.selectTbVirusDeviceList(tbVirusDevice);
    }

    /**
     * 新增防病毒安装总数表
     * 
     * @param tbVirusDevice 防病毒安装总数表
     * @return 结果
     */
    @Override
    public int insertTbVirusDevice(TbVirusDevice tbVirusDevice)
    {
        tbVirusDevice.setCreateTime(DateUtils.getNowDate());
        return tbVirusDeviceMapper.insertTbVirusDevice(tbVirusDevice);
    }

    /**
     * 修改防病毒安装总数表
     * 
     * @param tbVirusDevice 防病毒安装总数表
     * @return 结果
     */
    @Override
    public int updateTbVirusDevice(TbVirusDevice tbVirusDevice)
    {
        return tbVirusDeviceMapper.updateTbVirusDevice(tbVirusDevice);
    }

    /**
     * 批量删除防病毒安装总数表
     * 
     * @param deviceIds 需要删除的防病毒安装总数表主键
     * @return 结果
     */
    @Override
    public int deleteTbVirusDeviceByDeviceIds(Integer[] deviceIds)
    {
        return tbVirusDeviceMapper.deleteTbVirusDeviceByDeviceIds(deviceIds);
    }

    /**
     * 删除防病毒安装总数表信息
     * 
     * @param deviceId 防病毒安装总数表主键
     * @return 结果
     */
    @Override
    public int deleteTbVirusDeviceByDeviceId(Integer deviceId)
    {
        return tbVirusDeviceMapper.deleteTbVirusDeviceByDeviceId(deviceId);
    }
}
